package com.mxpio.erp.common.equipment.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.jpa.policy.impl.UUIDPolicy;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import com.mxpioframework.security.entity.Dept;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 设备状态对象 MB_ERP_EQUIPMENT_EQP_STATUS_RECORDS
 *
 * @author Cheng
 * @date 2023-07-01
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_EQUIPMENT_EQP_STATUS_RECORDS")
@Schema(description="设备状态")
public class EquipmentEqpStatusRecords extends BaseEntity {

private static final long serialVersionUID=1L;

    @Id
    @Generator(policy = UUIDPolicy.class)
    @Column(name = "ID_")
    @Schema(description = "主键")
    private String id;

    /*@Column(name = "EQP_ID_")
    @Schema(description = "设备ID")
    private String eqpId;*/

    @Column(name = "BASICS_CODE_")
    @Schema(description = "设备资产ID")
    @Dict(dicCode = "basicsCode", dicEntity = EquipmentEqpBasics.class, dicText = "eqpName")
    private String basicsCode;


    @Column(name = "REASON_")
    @Schema(description = "变更原因")
    private String reason;

    @Column(name = "NEXT_OPERATE_TIME_")
    @Schema(description = "下个操作时间")
    private Date nextOperateTime;

    @Column(name = "IS_DEL_")
    @Schema(description = "是否删除（0-正常；1-删除）")
    private Integer isDel;

    @Column(name = "BEFORE_STATUS_")
    @Schema(description = "变更前状态")
    @Dict(dicCode = "ERP_EQUIPMENT_EQP_STATUS")
    private Integer beforeStatus;

    @Column(name = "NOW_STATUS_")
    @Schema(description = "变更后状态")
    @Dict(dicCode = "ERP_EQUIPMENT_EQP_STATUS")
    private Integer nowStatus;


    @Column(name = "BEFORE_USE_DEPT_ID_")
    @Schema(description = "调拨前使用部门")
    @Dict(dicCode = "deptCode", dicEntity = Dept.class, dicText = "deptName")
    private String beforeUseDeptId;

    @Column(name = "now_Use_Dept_Id_")
    @Schema(description = "调拨后使用部门")
    @Dict(dicCode = "deptCode", dicEntity = Dept.class, dicText = "deptName")
    private String nowUseDeptId;
}
